<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
<%@include file="/WEB-INF/taglibs/common/taglibs.jsp" %>

<head>
    <title>Transactions Do Not Belong To Me</title>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
    <link rel="stylesheet" href="<c:url value="/css/styles.css"/>"/>
    <script src="<c:url value="/javascripts/common.js"/>" type="text/javascript"></script>

    <link rel="stylesheet"
          href="<c:url value="/javascripts/jscalendar/theme/calendar-system.css"/>"/>
    <script src="<c:url value="/javascripts/jscalendar/calendar-cfg.js"/>" type="text/javascript"></script>
    <script src="<c:url value="/javascripts/calendar.js"/>" type="text/javascript"></script>
    <script
            src="<c:url value="/javascripts/jscalendar/lang/calendar-en.js"/>" type="text/javascript"></script>
    <script src="<c:url value="/javascripts/jscalendar/calendar-setup.js"/>" type="text/javascript"></script>
    <script src="<c:url value="/javascripts/jquery-1.4.4.js"/>" type="text/javascript"></script>

</head>

<body>
<div class="page">
    <%@include file="../top_menu.jsp" %>
    <table width=100%>
         <tr>
	        	<td><c:import url="/WEB-INF/jsp/menu/transaction_menu.jsp" /></td>
     	</tr>
        <tr>
            <td>
                <%@include file="/WEB-INF/jsp/include/messages.jsp" %>
                <br/></td>
        </tr>
    </table>
    <div class="contentArea">

        <c:choose>
            <c:when test="${empty transactions.transactionDetails}">
                <tr>
                    <td colspan="12"><spring:message
                            code="sp.transactionform.label.atpresenttherearenotransactiontext"/>.<br/>
                        <spring:message code="sp.transactionform.label.ifyouwereexpectingsometransactiontext"/></td>
                </tr>
            </c:when>
            <c:otherwise>
                <table border=0 cellpadding=0 cellspacing=0>
                    <tr>
                        <td style="font-weight: bold;"><spring:message
                                code="sp.transactionform.label.transactionsDoNotBelongToMe"/></td>
                    </tr>
                </table>
                <form:form id="main" commandName="transactions" method="post" action="step1.htm" >
                    <c:set var="numberOfPayees" value="${fn:length(transactions.payeeMap)}"/>

                    <table border=0 cellpadding=4 cellspacing=1 width=100% bgcolor="#D7D7D7">
                        <tr>
                            <td colspan="4">&nbsp;</td>
                        </tr>
                        <tr bgcolor="#FAFAF7">
                            <td align="center" rowspan="1" style="font-weight: bold;">
                            	<spring:message code="sp.transactionform.label.ssn"/>
                           	</td>
                            <td align="center" rowspan="1" style="font-weight: bold;">
                            	<spring:message code="sp.transactionform.label.customername"/>
                           	</td>
                            <td align="center" rowspan="1" style="font-weight: bold;">
                            	<spring:message code="sp.transactionform.label.amountreceived"/>
                           	</td>
                            <td align="center" rowspan="1" style="font-weight: bold;">
                            	Select <a href="#" onclick="return ch_select(true);">All</a>
                                <a href="#" onclick="return ch_select(false);">None</a>
                            </td>
                        </tr>


                        <c:forEach var="transaction" items="${transactions.transactionDetails}" varStatus="i">
                            <tr bgcolor="#FFFFFF">
                                <td align="left">
                                	${transaction.value.customerSSN}
                                    <form:hidden path="transactionDetails[${transaction.key}].customerSSN"/>
                                </td>
                                <td align="left">
                                	${transaction.value.customerName}
                                    <form:hidden path="transactionDetails[${transaction.key}].customerName"/>
                                </td>
                                <td align="right">
                                	<form:input path="transactionDetails[${transaction.key}].amount" disabled="true" cssClass="disabled"/>
                                    <form:hidden path="transactionDetails[${transaction.key}].amount"/>
                                </td>
                                <td align="center">
                                	<form:checkbox path="transactionDetails[${transaction.key}].checked"/>
                               	</td>
                            </tr>
                        </c:forEach>
                        <tr bgcolor="#FAF7F7">
                            <td colspan="4" style="font-weight: bold;"><form:errors path="*" cssClass="errors"/><br>
                                <spring:message code="sp.transactionform.label.messageoftheday"/></td>
                        </tr>
                        <tr bgcolor="#FAF7F7">
                            <td colspan="4" style="color: green; "></td>
                            <td>&nbsp;</td>
                        </tr>
                         <tr>
                            <td colspan="4" align="left" style="padding-left:25px;" width="100%"><br/>
                                <input type="submit" name="button_Move_To_New_Matched" value='<spring:message code="sp.transactionform.label.moveTransactionToMatched"/>'
                                       class='ui-button ui-state-default ui-corner-all'/>
                                 
                                 <%--<input type="submit" name="button_Move_To_Do_Not_belong" value='<spring:message code="sp.transactionform.label.moveTransactionDoNotBelongToMe"/>'
                                       class='ui-button ui-state-default ui-corner-all'/>--%>
                                       
                                 <input type="submit" name="button_Move_To_Needing_To_Return" value='<spring:message code="sp.transactionform.label.needingToReturnedBack"/>'
                                       class='ui-button ui-state-default ui-corner-all'/>  
                                       
                                  <input type="submit" name="button_Move_To_New_Needing_Match" value='<spring:message code="sp.transactionform.label.moveToTransactionNeedingAMatch"/>'
                                       class='ui-button ui-state-default ui-corner-all'/>       
                            </td>
                        </tr> 
                    </table>
                </form:form>
            </c:otherwise>
        </c:choose>
        <div id="error" class="errors"></div>
    </div>
</div>
<%@include file="/WEB-INF/jsp/include/footer.jsp" %>
</body>
</html>